package com.gao.dao;

import java.sql.SQLException;
import java.util.List;

import com.gao.domain.Product;

public interface ProductDao {
	/**
     * ��ѯ������Ʒ
     *
     * @param 
     * @return 
     */
	List<Product> findAllProducts() throws SQLException;
	
	/**
     * ͨ��pid��ѯĳ����Ʒ
     *
     * @param pid
     * @return 
     */
	Product findProductById(int pid) throws SQLException;
	
	/**
     * ��Ʒ���
     *
     * @param pid
     * @param num
     * @return  
     */
	boolean inProductById(int pid, int num) throws SQLException;
	
	/**
     * ��Ʒ����
     *
     * @param pid
     * @param num
     * @return  
     */
	boolean outProductById(int pid, int num) throws SQLException;
}
